
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define MAXVEX 20

//边节点
typedef struct EdgeNode{
    int adjvex; //邻接点下标
    int weight; //权重值
    struct EdgeNode * next; //下一个了邻接点
} EdgeNode;
//顶点节点
typedef struct VertexNode{
    int in;                 //入度数
    char value;             //值
    EdgeNode *firstEdge;    //边节点头指针
}VertexNode;
//开放节点
typedef struct GraphAdjList{
    VertexNode ** adjlist ;    //点数组
    int vSz;    //顶点数
    int eSz;    //边数
} GraphAdjList;
//创建
GraphAdjList * AdInit(char * points,char edges [][3],int eSz);
//表输出
void GraphAdPrint(GraphAdjList * graph);
//深度优先遍历
void DFSTraverse(GraphAdjList * graph);
//广度优先遍历
void BFSTraverse(GraphAdjList * graph);
//拓扑排序
void TopologicalSort(GraphAdjList * graph);
//关键路径
void CriticalPath(GraphAdjList * graph);